package com.my.consumer.controller;

import com.my.consumer.rpc.HelloFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author marshal
 * @Date 2021-07-20 9:02 PM
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private HelloFeign helloFeign;

    @GetMapping("/message/{msg}")
    public String message(@PathVariable("msg") String msg) {
        return helloFeign.message(msg);
    }
}
